﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MS.InformationManagement.Presenter.Support;
using MS.InformationManagement.BLL.AllowingAccessControl;
namespace MS.InformationManagement.Presenter.AllowingAccessControl
{
    public class AllowingAccessControlPresenter : BasePresenter<IAllowingAccessControlView>
    {
       #region Properties

        public AllowingAccessControlPresenter(IAllowingAccessControlView view) : base(view) { }

        #endregion

        #region Methods

        public void HandleLoad()
        {
            if (View.IsDialog || View.IsInformed)
            {
                View.Result = true;
            }
            else
            {
                View.Result = MS.InformationManagement.BLL.AllowingAccessControl.AllowingAccessControl.AccesToPage(View.CurrentUrl);
                View.AllowedRibbonActions = MS.InformationManagement.BLL.AllowingAccessControl.AllowingAccessControl.GetRibbonAllowedActionsCurrentUser();
            }
            View.Show();
        }

        #endregion
    }
}
